using System;
using System.Security.Permissions;
using System.Web;

namespace PickGold.Charting
{
	[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
	public class ChartPaintEventArgs : EventArgs
	{
		private Chart _chart;
		private object _chartElement;
		private ChartGraphics _chartGraph;
		private CommonElements _common;
		private ElementPosition _position;

		private ChartPaintEventArgs()
		{
		}

		internal ChartPaintEventArgs(object chartElement, ChartGraphics chartGraph, CommonElements common, ElementPosition position)
		{
			this._chartElement = chartElement;
			this._chartGraph = chartGraph;
			this._common = common;
			this._position = position;
		}

		public Chart Chart
		{
			get
			{
				if ((this._chart == null) && (this._common != null))
				{
					this._chart = this._common.Chart;
				}
				return this._chart;
			}
		}

		public object ChartElement
		{
			get
			{
				return this._chartElement;
			}
		}

		public ChartGraphics ChartGraphics
		{
			get
			{
				return this._chartGraph;
			}
		}

		internal CommonElements CommonElements
		{
			get
			{
				return this._common;
			}
		}

		public ElementPosition Position
		{
			get
			{
				return this._position;
			}
		}
	}
}

